package com.ruoyi.hualian.domain;

import com.alibaba.excel.annotation.ExcelProperty;
import com.ruoyi.common.annotation.Excel;
import lombok.Data;

import java.io.Serializable;

/**
 * ERP系统BOM表批量导入功能生成Excel表
 * 返回BOM对象
 *
 * @author hujian
 */
@Data
public class ResultBom implements Serializable, Comparable<ResultBom> {

    /*
        商品编码
     */
    @Excel(name = "加工件编码")
    @ExcelProperty(value = "加工件编码", index = 0)
    private String workpieceCode;

    /*
        无用
     */
    @Excel(name = "行号")
    @ExcelProperty(value = "行号", index = 1)
    private String lineNumber;

    /*
        ERP系统商品的BOM信息: 编码
     */
    @Excel(name = "下级物料编码")
    @ExcelProperty(value = "下级物料编码", index = 2)
    private String subordinateMaterialsCode;

    /*
        ERP系统商品的BOM信息: 名称
     */
    @Excel(name = "下级物料名称")
    @ExcelProperty(value = "下级物料名称", index = 3)
    private String subordinateMaterialsName;

    /*
        ERP系统商品的BOM信息: 规格
     */
    @Excel(name = "下级物料规格")
    @ExcelProperty(value = "下级物料规格", index = 4)
    private String subordinateMaterialsSpecs;

    /*
        ERP系统商品的BOM信息: 型号
     */
    @Excel(name = "下级物料型号")
    @ExcelProperty(value = "下级物料型号", index = 5)
    private String subordinateMaterialsType;

    /*
        ERP系统商品的BOM信息: 品牌
     */
    @Excel(name = "下级物料品牌")
    @ExcelProperty(value = "下级物料品牌", index = 6)
    private String subordinateMaterialsBrand;

    /*
        ERP系统商品的BOM信息: 底数
     */
    @Excel(name = "底数")
    @ExcelProperty(value = "底数", index = 7)
    private String baseNumber;

    /*
        ERP系统商品的BOM信息: 用量
     */
    @Excel(name = "用量")
    @ExcelProperty(value = "用量", index = 8)
    private String dosage;

    /*
        ERP系统商品的BOM信息: 单位
     */
    @Excel(name = "单位")
    @ExcelProperty(value = "单位", index = 9)
    private String unit;

    /*
        ERP系统商品的BOM信息: 损耗率
     */
    @Excel(name = "损耗率")
    @ExcelProperty(value = "损耗率", index = 10)
    private String lossRate;

    /*
        ERP系统商品的BOM信息: 工序
     */
    @Excel(name = "对应工序")
    @ExcelProperty(value = "对应工序", index = 11)
    private String correspondingProcess;

    @Excel(name = "备注1")
    @ExcelProperty(value = "备注1", index = 12)
    private String remarkOne;

    @Excel(name = "备注2")
    @ExcelProperty(value = "备注2", index = 13)
    private String remarkTwo;

    @Override
    public int compareTo(ResultBom resultBom) {
        return this.workpieceCode.compareTo(resultBom.getWorkpieceCode());
    }
}
